package uaiContacts.model;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Droog
 */
@Entity
@Table(name = "tb_calendario_evento", catalog = "sistema_ipi", schema = "public")
public class CalendarioEvento implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id_evento", nullable = false)
    private Integer idEvento;
    @Basic(optional = false)
    @Column(name = "nom_evento", nullable = false, length = 40)
    private String nomEvento;
    @Basic(optional = false)
    @Column(name = "hr_evento", nullable = false)
    @Temporal(TemporalType.TIME)
    private Date hrEvento;
    @Basic(optional = false)
    @Column(name = "dt_evento", nullable = false)
    @Temporal(TemporalType.DATE)
    private Date dtEvento;
    @Column(length = 2147483647)
    private String obs;
    @JoinColumn(name = "id_igreja", referencedColumnName = "id_igreja", nullable = false)
    @ManyToOne(optional = false)
    private DadosIgreja idIgreja;

    public CalendarioEvento() {
    }

    public CalendarioEvento(Integer idEvento) {
        this.idEvento = idEvento;
    }

    public CalendarioEvento(Integer idEvento, String nomEvento, Date hrEvento, Date dtEvento) {
        this.idEvento = idEvento;
        this.nomEvento = nomEvento;
        this.hrEvento = hrEvento;
        this.dtEvento = dtEvento;
    }

    public Integer getIdEvento() {
        return idEvento;
    }

    public void setIdEvento(Integer idEvento) {
        this.idEvento = idEvento;
    }

    public String getNomEvento() {
        return nomEvento;
    }

    public void setNomEvento(String nomEvento) {
        this.nomEvento = nomEvento;
    }

    public Date getHrEvento() {
        return hrEvento;
    }

    public void setHrEvento(Date hrEvento) {
        this.hrEvento = hrEvento;
    }

    public Date getDtEvento() {
        return dtEvento;
    }

    public void setDtEvento(Date dtEvento) {
        this.dtEvento = dtEvento;
    }

    public String getObs() {
        return obs;
    }

    public void setObs(String obs) {
        this.obs = obs;
    }

    public DadosIgreja getIdIgreja() {
        return idIgreja;
    }

    public void setIdIgreja(DadosIgreja idIgreja) {
        this.idIgreja = idIgreja;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idEvento != null ? idEvento.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof CalendarioEvento)) {
            return false;
        }
        CalendarioEvento other = (CalendarioEvento) object;
        if ((this.idEvento == null && other.idEvento != null) || (this.idEvento != null && !this.idEvento.equals(other.idEvento))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "model.CalendarioEvento[ idEvento=" + idEvento + " ]";
    }
    
}
